<template>
	<view class="layout">
		<demo-child ref="dchlid"></demo-child>
		<view class="---"></view>
		<button @click="update">点击修改子元素子值</button>
	</view>
</template>

<script setup>
	import {
		onMounted,
		ref
	} from 'vue';

	const dchlid = ref(null);
	
	const update = function(){
		dchlid.value.updateCount();
	}

	onMounted(() => {
		console.log(dchlid.value);
	})
</script>

<style lang="scss" scoped>

</style>